import { BasePageDto, BaseScrollPageDto } from '@/common/base/base.dto';
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
import {
  IsNotEmpty,
  IsOptional,
  IsString, IsUUID,
  Max, MaxLength,
} from 'class-validator';

export class EvaluationComposeIndexDto extends BaseScrollPageDto {
  @IsOptional()
  @ApiPropertyOptional()
  @IsString()
  keyword?: string;

  @IsOptional()
  @ApiPropertyOptional()
  @IsString()
  uuids?: string;
}

export class EvaluationComposeCreateDto {
  @IsNotEmpty()
  @ApiProperty()
  @IsString()
  @MaxLength(500)
  title: string;

  @IsNotEmpty()
  @ApiProperty()
  @IsUUID()
  earbudsEvaluationUuid: string;

  @IsNotEmpty()
  @ApiProperty()
  @IsString()
  earbudsEvaluationDataGroup: string;

  @IsOptional()
  @ApiPropertyOptional()
  @IsUUID()
  soundSourceEvaluationUuid?: string;

  @IsOptional()
  @ApiPropertyOptional()
  @IsString()
  soundSourceEvaluationDataGroup?: string;
}

export class EvaluationComposeUpdateDto extends PartialType(EvaluationComposeCreateDto){
}
